﻿using JuCheap.Core.Infrastructure;
using JuCheap.Core.Model;
using JuCheap.Core.Model.Message;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JuCheap.Core.IService.AppService
{

    /// <summary>
    /// 站内信服务接口
    /// </summary>
    public interface IMessageService
    {
        /// <summary>
        /// 创建站内信
        /// </summary>
        /// <param name="messageReq">站内信请求内容模型</param>
        /// <returns></returns>
        Task<string> CreateAsync(MessageCreateRequestDto messageReq);

        /// <summary>
        /// 获取站内信详细信息
        /// </summary>
        /// <param name="messageId">站内信Id</param>
        /// <returns></returns>
        Task<MyMessageResponseDto> GetAsync(string messageId);

        /// <summary>
        /// 阅读
        /// </summary>
        /// <param name="messageIds">站内信Id</param>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        Task ReadAsync(IList<string> messageIds, string userId);

        /// <summary>
        /// 获取我的站内信(一次最多获取1000条)
        /// </summary>
        Task<PagedResult<MyMessageResponseDto>> GetMyMessagesAsync(SysMessageFilter filter);

        /// <summary>
        /// 获取我未读站内信数量
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        Task<int> GetMyMessageUnReadNumberAsync(string userId);
    }
}
